var Level = require('Level');
cc.Class({
    extends: cc.Component,

    properties: {
        levelNum:1,
        levelLabel:{
            default:null,
            type:cc.Node,
        }
    },

    // use this for initialization
    onLoad: function () {
        var self = this;
        this.node.on(cc.Node.EventType.TOUCH_START,function(event){
            // 将此节点增加为全局关卡变量
            Level.instance.currentLevel = self.levelNum;
            // 触发进入关卡事件
            if(Level.instance.lockStatus[self.levelNum - 1] === 1){
                cc.director.loadScene('GameLoad');
            }
        });
    },
});
